From 44f85d4769167e0e30f3015356f446a4f3278227 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 16 Jun 2006 16:36:25 +0000 Subject: [PATCH] When starting a preview from the print dialog, set the action to PREVIEW. 2006-06-16 Matthias Clasen * gtk/gtkprintoperation-unix.c (handle_print_response): When starting a preview from the print dialog, set the action to PREVIEW. * gtk/gtkprintoperation.c: Cosmetic changes. --- ChangeLog | 7 +++++++ ChangeLog.pre-2-10 | 7 +++++++ gtk/gtkprintoperation-unix.c | 2 ++ gtk/gtkprintoperation.c | 7 +++---- 4 files changed, 19 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index d93482da74..b619635eaa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2006-06-16 Matthias Clasen + + * gtk/gtkprintoperation-unix.c (handle_print_response): When starting + a preview from the print dialog, set the action to PREVIEW. + + * gtk/gtkprintoperation.c: Cosmetic changes. + 2006-06-16 Matthias Clasens * gtk/gtkprintoperation-unix.c: Mark the preview filename diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index d93482da74..b619635eaa 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,10 @@ +2006-06-16 Matthias Clasen + + * gtk/gtkprintoperation-unix.c (handle_print_response): When starting + a preview from the print dialog, set the action to PREVIEW. + + * gtk/gtkprintoperation.c: Cosmetic changes. + 2006-06-16 Matthias Clasens * gtk/gtkprintoperation-unix.c: Mark the preview filename diff --git a/gtk/gtkprintoperation-unix.c b/gtk/gtkprintoperation-unix.c index 69676c3b60..0de8add643 100644 --- a/gtk/gtkprintoperation-unix.c +++ b/gtk/gtkprintoperation-unix.c @@ -471,6 +471,8 @@ handle_print_response (GtkWidget *dialog, rdata->result = GTK_PRINT_OPERATION_RESULT_APPLY; rdata->do_preview = TRUE; rdata->do_print = TRUE; + + rdata->op->priv->action = GTK_PRINT_OPERATION_ACTION_PREVIEW; } if (rdata->do_print) diff --git a/gtk/gtkprintoperation.c b/gtk/gtkprintoperation.c index 5921b0f369..001ab3f497 100644 --- a/gtk/gtkprintoperation.c +++ b/gtk/gtkprintoperation.c @@ -1840,10 +1840,9 @@ typedef struct gint page, start, end, inc; - gboolean initialized; - GtkWidget *progress; + gboolean initialized; gboolean is_preview; } PrintPagesData; @@ -2194,7 +2193,7 @@ print_pages (GtkPrintOperation *op, data = g_new0 (PrintPagesData, 1); data->op = g_object_ref (op); - data->is_preview = (op->priv->action == GTK_PRINT_OPERATION_ACTION_PREVIEW); + data->is_preview = (priv->action == GTK_PRINT_OPERATION_ACTION_PREVIEW); if (priv->show_progress) { @@ -2221,7 +2220,7 @@ print_pages (GtkPrintOperation *op, g_signal_emit_by_name (op, "preview", GTK_PRINT_OPERATION_PREVIEW (op), - op->priv->print_context, + priv->print_context, parent, &handled); -- 2.30.2